load("@bazel_gazelle//:def.bzl", "gazelle")
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

# gazelle:prefix resty.dev/v3
# gazelle:go_naming_convention import_alias
gazelle(name = "gazelle")

go_library(
    name = "resty",
    srcs = [
        "circuit_breaker.go",
        "client.go",
        "curl.go",
        "debug.go",
        "digest.go",
        "load_balancer.go",
        "middleware.go",
        "multipart.go",
        "redirect.go",
        "request.go",
        "response.go",
        "resty.go",
        "retry.go",
        "sse.go",
        "stream.go",
        "trace.go",
        "transport_dial.go",
        "transport_dial_wasm.go",
        "util.go",
    ],
    importpath = "resty.dev/v3",
    visibility = ["//visibility:public"],
    deps = ["@org_golang_x_net//publicsuffix:go_default_library"],
)

go_test(
    name = "resty_test",
    srcs = [
        "benchmark_test.go",
        "cert_watcher_test.go",
        "client_test.go",
        "context_test.go",
        "curl_test.go",
        "digest_test.go",
        "load_balancer_test.go",
        "middleware_test.go",
        "multipart_test.go",
        "request_test.go",
        "resty_test.go",
        "retry_test.go",
        "sse_test.go",
        "util_test.go",
    ],
    data = glob([".testdata/*"]),
    embed = [":resty"],
)

alias(
    name = "go_default_library",
    actual = ":resty",
    visibility = ["//visibility:public"],
)
